package schoolWork.Test8;
import java.util.Scanner;
 class TestLength {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        String s = input.nextLine();
        int n = input.nextInt();
        int len = Length.length(s);
        System.out.println(len);
        len = Length.length(n);
        System.out.println(len);
    }
}
class Length {
    public static int length(String s) {
        int cnt = 0;
        for (int i = 0; i < s.length(); i++) {
            char ch = s.charAt(i);
            if (Character.isLetter(ch)) {
                cnt++;
            }
        }
        return cnt;
    }

    public static int length(int a) {
        int cnt = 0;
        if(a== 0)
        while (a != 0) {
            a/=10;
            cnt++;
        }
        return cnt;
    }
}
